Skip to content

docs: Document the SPA and static cache control environment variables - #775

Merged
developerjamiu merged 3 commits into
mainfrom
docs/spa-static-cache-env
Sep 3, 2026
Merged

docs: Document the SPA and static cache control environment variables#775
developerjamiu merged 3 commits into
mainfrom
docs/spa-static-cache-env

Conversation

@developerjamiu

Copy link
Copy Markdown
Contributor

Companion to #756. The web server ships three cache-control environment variables built on the same mechanism; #756 documents the FlutterRoute one, and this adds the other two on their own pages:

  • SERVERPOD_WEB_SERVER_STATIC_CACHE_CONTROL on the Static files page, next to the cache-control helpers it substitutes for.
  • SERVERPOD_WEB_SERVER_SPA_CACHE_CONTROL on the Single-page apps page, including the two SpaRoute-specific rules: the fallback file is always served without a Cache-Control header, and the static variable does not apply to SpaRoute.

In all three cases an explicit cacheControlFactory takes precedence over the environment variable.

@developerjamiu developerjamiu self-assigned this Sep 1, 2026
@developerjamiu developerjamiu added the documentation Improvements or additions to documentation label Sep 1, 2026
Comment thread docs/06-concepts/05-web-server/05-static-files.md
…-env

# Conflicts:
#	docs/06-concepts/lookups/configuration-reference.md

@SandPod SandPod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@developerjamiu
developerjamiu enabled auto-merge (squash) September 3, 2026 07:25
@developerjamiu
developerjamiu merged commit 5aeb8e7 into main Sep 3, 2026
5 checks passed
@developerjamiu
developerjamiu deleted the docs/spa-static-cache-env branch September 3, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants